package struts.form;



import java.io.UnsupportedEncodingException;

import javax.servlet.http.*;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionErrors;
public class HelloForm extends ActionForm{
	private String info;
	private String sex;
	public ActionErrors validate(ActionMapping mapping,HttpServletRequest request) {
		
		ActionErrors errors=new ActionErrors();
		if (this.info==null||"".equals(this.info)) {
			errors.add("error",new ActionMessage("error.info"));
		} 
		return errors;
	}
	
	public void reset(ActionMapping mapping,HttpServletRequest request) {
	
		
	}
	
	public String getInfo() {
		return info;
	}
	public String getSex() {
		return sex;
	}
	
	public void setInfo(String info) {
		this.info=info;
	}
	public void setSex(String sex) {
		this.sex=sex;
	}
}
